﻿using System;
using System.Collections.Generic;
using System.Text;

using YouHP.Utility;
using YouHP.BLL;

namespace YouHP.Pages.Member
{
    public class Activate : YouHP.Pages.BasePage
    {
        protected override void ShowPage()
        {
            base.ShowPage();

            string userName = RequestTools.GetQueryString("userName");
            string activeCode = RequestTools.GetQueryString("activeCode");

            try
            {
                if (UserBLL.Instance.ActiveUserByActiveCode(userName, activeCode))
                {
                    //激活成功，并提示信息
                    this.AddMsgLine("您已成功激活账号："+ userName + "，页面将自动跳转至登录页面！");
                    this.SetMetaRefresh(3, "../login.aspx");
                }
                else
                {
                    //激活失败，并提示信息
                    this.AddMsgLine("对不起，您的账号：" + userName + "激活失败，请再次确认！");
                }
            }
            catch
            {

            }
        }
    }
}
